 package tools.wztosql;


import client.inventory.MapleInventoryType;
import com.alibaba.druid.pool.DruidPooledConnection;
import constants.GameConstants;
import constants.ItemConstants;
import database.DatabaseConnection;
import provider.*;
import tools.Pair;

import java.io.File;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;


















 public class DumpItems {
/*  21 */   private final MapleDataProvider item = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("wzpath") + "/Item.wz"));
/*  22 */   private final MapleDataProvider string = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("wzpath") + "/String.wz"));
/*  23 */   private final MapleDataProvider character = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("wzpath") + "/Character.wz"));
/*  24 */   protected final MapleData cashStringData = this.string.getData("Cash.img");
/*  25 */   protected final MapleData consumeStringData = this.string.getData("Consume.img");
/*  26 */   protected final MapleData eqpStringData = this.string.getData("Eqp.img");
/*  27 */   protected final MapleData etcStringData = this.string.getData("Etc.img");
/*  28 */   protected final MapleData insStringData = this.string.getData("Ins.img");
/*  29 */   protected final MapleData petStringData = this.string.getData("Pet.img");
/*  30 */   protected final Set<Integer> doneIds = new LinkedHashSet<>();

/*  32 */   protected int id = 0;

   public void dumpItems() throws Exception {
/*  35 */     try (DruidPooledConnection con = DatabaseConnection.getInstance().getConnection()) {
/*  36 */       PreparedStatement psa = con.prepareStatement("INSERT INTO wz_itemadddata(itemid, `key`, `subKey`, `value`) VALUES (?, ?, ?, ?)");
/*  37 */       PreparedStatement psr = con.prepareStatement("INSERT INTO wz_itemrewarddata(itemid, item, prob, quantity, period, worldMsg, effect) VALUES (?, ?, ?, ?, ?, ?, ?)");
/*  38 */       PreparedStatement ps = con.prepareStatement("INSERT INTO wz_itemdata(itemid, name, msg, `desc`, slotMax, price, wholePrice, stateChange, flags, karma, meso, monsterBook, itemMakeLevel, questId, scrollReqs, consumeItem, totalprob, incSkill, replaceId, replaceMsg, `create`, afterImage) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
/*  39 */       PreparedStatement pse = con.prepareStatement("INSERT INTO wz_itemequipdata(itemid, itemLevel, `key`, `value`) VALUES (?, ?, ?, ?)");
       try {
/*  41 */         dumpItems(psa, psr, ps, pse);
/*  42 */       } catch (Exception e) {
/*  43 */         e.printStackTrace();
       } finally {
/*  45 */         psa.executeBatch();
/*  46 */         psa.close();
/*  47 */         psr.executeBatch();
/*  48 */         psr.close();
/*  49 */         pse.executeBatch();
/*  50 */         pse.close();
/*  51 */         ps.executeBatch();
/*  52 */         ps.close();
       }
     }
   }

   public void delete(String sql) throws Exception {
/*  58 */     try(DruidPooledConnection con = DatabaseConnection.getInstance().getConnection(); 
/*  59 */         PreparedStatement ps = con.prepareStatement(sql)) {
/*  60 */       ps.executeUpdate();
     }
   }


   public boolean doesExist(String sql) throws Exception {
     boolean ret;
/*  67 */     try(DruidPooledConnection con = DatabaseConnection.getInstance().getConnection(); 
/*  68 */         PreparedStatement ps = con.prepareStatement(sql); ResultSet rs = ps.executeQuery()) {
/*  69 */       ret = rs.next();
     }


/*  73 */     return ret;
   }

   public void dumpItems(MapleDataProvider d, PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, boolean charz) throws Exception {
/*  77 */     for (MapleDataDirectoryEntry topDir : d.getRoot().getSubdirectories()) {
/*  78 */       if (!topDir.getName().equalsIgnoreCase("Special") && !topDir.getName().equalsIgnoreCase("Afterimage"))
/*  79 */         for (MapleDataFileEntry ifile : topDir.getFiles()) {
/*  80 */           MapleData iz = d.getData(topDir.getName() + "/" + ifile.getName());
/*  81 */           if (charz || topDir.getName().equalsIgnoreCase("Pet")) {
/*  82 */             dumpItem(psa, psr, ps, pse, iz); continue;
           }
/*  84 */           for (MapleData itemData : iz) {
/*  85 */             dumpItem(psa, psr, ps, pse, itemData);
           }
         }
     }
   }

   public void dumpItem(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse, MapleData iz) throws Exception {
     short ret;
     double d;
     try {
/*  95 */       if (iz.getName().endsWith(".img")) {
/*  96 */         this.id = Integer.parseInt(iz.getName().substring(0, iz.getName().length() - 4));
       } else {
/*  98 */         this.id = Integer.parseInt(iz.getName());
       }
/* 100 */       System.out.println(this.id);
/* 101 */     } catch (NumberFormatException nfe) {
       return;
     }
/* 104 */     if (this.doneIds.contains(Integer.valueOf(this.id)) || ItemConstants.getInventoryType(this.id) == MapleInventoryType.UNDEFINED) {
       return;
     }
/* 107 */     this.doneIds.add(Integer.valueOf(this.id));

/* 109 */     ps.setInt(1, this.id);
/* 110 */     MapleData stringData = getStringData(this.id);
/* 111 */     if (stringData == null) {
/* 112 */       ps.setString(2, "");
/* 113 */       ps.setString(3, "");
/* 114 */       ps.setString(4, "");
     } else {
/* 116 */       ps.setString(2, MapleDataTool.getString("name", stringData, ""));
/* 117 */       ps.setString(3, MapleDataTool.getString("msg", stringData, ""));
/* 118 */       ps.setString(4, MapleDataTool.getString("desc", stringData, ""));
     }

/* 121 */     MapleData smEntry = iz.getChildByPath("info/slotMax");
/* 122 */     if (smEntry == null) {
/* 123 */       if (ItemConstants.getInventoryType(this.id) == MapleInventoryType.EQUIP) {
/* 124 */         ret = 1;
       } else {
/* 126 */         ret = 100;
       }
     } else {
/* 129 */       ret = (short)MapleDataTool.getIntConvert(smEntry, -1);
     }
/* 131 */     ps.setInt(5, ret);

/* 133 */     MapleData aData = iz.getChildByPath("info/autoPrice");
/* 134 */     boolean autoPrice = (MapleDataTool.getIntConvert(aData, 0) > 0);
/* 135 */     MapleData pData = iz.getChildByPath("info/unitPrice");
/* 136 */     if (pData != null) {
       try {
/* 138 */         d = MapleDataTool.getDouble(pData);
/* 139 */       } catch (Exception e) {
/* 140 */         d = MapleDataTool.getIntConvert(pData, -1);
       }
     } else {
/* 143 */       pData = iz.getChildByPath("info/price");
/* 144 */       if (pData == null && !autoPrice) {
/* 145 */         d = -1.0D;
/* 146 */       } else if (autoPrice) {
/* 147 */         MapleData lvData = iz.getChildByPath("info/lv");
/* 148 */         d = (MapleDataTool.getIntConvert(lvData, 0) * 2);
       } else {
/* 150 */         d = MapleDataTool.getIntConvert(pData, -1);
       }
     }
/* 153 */     if (this.id == 2070019 || this.id == 2330007) {
/* 154 */       d = 1.0D;
     }
/* 156 */     ps.setString(6, String.valueOf(d));
/* 157 */     ps.setInt(7, MapleDataTool.getIntConvert("info/price", iz, -1));
/* 158 */     ps.setInt(8, MapleDataTool.getIntConvert("info/stateChangeItem", iz, 0));
/* 159 */     int flags = MapleDataTool.getIntConvert("info/bagType", iz, 0);
/* 160 */     if (MapleDataTool.getIntConvert("info/notSale", iz, 0) > 0) {
/* 161 */       flags |= 0x10;
     }
/* 163 */     if (MapleDataTool.getIntConvert("info/expireOnLogout", iz, 0) > 0) {
/* 164 */       flags |= 0x20;
     }
/* 166 */     if (MapleDataTool.getIntConvert("info/pickUpBlock", iz, 0) > 0) {
/* 167 */       flags |= 0x40;
     }
/* 169 */     if (MapleDataTool.getIntConvert("info/only", iz, 0) > 0) {
/* 170 */       flags |= 0x80;
     }
/* 172 */     if (MapleDataTool.getIntConvert("info/accountSharable", iz, 0) > 0) {
/* 173 */       flags |= 0x100;
     }
/* 175 */     if (MapleDataTool.getIntConvert("info/quest", iz, 0) > 0) {
/* 176 */       flags |= 0x200;
     }
/* 178 */     if (this.id != 4310008 && MapleDataTool.getIntConvert("info/tradeBlock", iz, 0) > 0) {
/* 179 */       flags |= 0x400;
     }
/* 181 */     if (MapleDataTool.getIntConvert("info/accountShareTag", iz, 0) > 0) {
/* 182 */       flags |= 0x800;
     }
/* 184 */     if (MapleDataTool.getIntConvert("info/mobHP", iz, 0) > 0 && MapleDataTool.getIntConvert("info/mobHP", iz, 0) < 100) {
/* 185 */       flags |= 0x1000;
     }
/* 187 */     ps.setInt(9, flags);
/* 188 */     ps.setInt(10, MapleDataTool.getIntConvert("info/tradeAvailable", iz, 0));
/* 189 */     ps.setInt(11, MapleDataTool.getIntConvert("info/meso", iz, 0));
/* 190 */     ps.setInt(12, MapleDataTool.getIntConvert("info/mob", iz, 0));
/* 191 */     ps.setInt(13, MapleDataTool.getIntConvert("info/lv", iz, 0));
/* 192 */     ps.setInt(14, MapleDataTool.getIntConvert("info/questId", iz, 0));
/* 193 */     int totalprob = 0;
/* 194 */     StringBuilder scrollReqs = new StringBuilder(), consumeItem = new StringBuilder(), incSkill = new StringBuilder();
/* 195 */     MapleData dat = iz.getChildByPath("req");
/* 196 */     if (dat != null) {
/* 197 */       for (MapleData req : dat) {
/* 198 */         if (scrollReqs.length() > 0) {
/* 199 */           scrollReqs.append(",");
         }
/* 201 */         scrollReqs.append(MapleDataTool.getIntConvert(req, 0));
       }
     }
/* 204 */     dat = iz.getChildByPath("consumeItem");
/* 205 */     if (dat != null) {
/* 206 */       for (MapleData req : dat) {
/* 207 */         if (consumeItem.length() > 0) {
/* 208 */           consumeItem.append(",");
         }
/* 210 */         consumeItem.append(MapleDataTool.getIntConvert(req, 0));
       }
     }
/* 213 */     ps.setString(15, scrollReqs.toString());
/* 214 */     ps.setString(16, consumeItem.toString());
/* 215 */     Map<Integer, Map<String, Integer>> equipStats = new HashMap<>();
/* 216 */     equipStats.put(Integer.valueOf(-1), new HashMap<>());
/* 217 */     dat = iz.getChildByPath("mob");
/* 218 */     if (dat != null) {
/* 219 */       for (MapleData child : dat) {
/* 220 */         ((Map<String, Integer>)equipStats.get(Integer.valueOf(-1))).put("mob" + MapleDataTool.getIntConvert("id", child, 0), Integer.valueOf(MapleDataTool.getIntConvert("prob", child, 0)));
       }
     }
/* 223 */     dat = iz.getChildByPath("info/level/case");
/* 224 */     if (dat != null) {
/* 225 */       for (MapleData info : dat) {
/* 226 */         for (MapleData data : info) {
/* 227 */           String[] skillString = { "Skill", "EquipmentSkill" };
/* 228 */           for (String s : skillString) {
/* 229 */             if (data.getName().length() == 1 && data.getChildByPath(s) != null) {
/* 230 */               for (MapleData skil : data.getChildByPath(s)) {
/* 231 */                 int incSkillz = MapleDataTool.getIntConvert("id", skil, 0);
/* 232 */                 if (incSkillz != 0) {
/* 233 */                   if (incSkill.length() > 0) {
/* 234 */                     incSkill.append(",");
                   }
/* 236 */                   incSkill.append(incSkillz);
                 }
               }
             }
           }
         }
       }
     }
/* 244 */     dat = iz.getChildByPath("info/level");
/* 245 */     if (dat != null && MapleDataTool.getIntConvert("fixLevel", dat, 0) != 0 && 
/* 246 */       MapleDataTool.getIntConvert("fixLevel", dat, 0) != 0) {
/* 247 */       equipStats.put(Integer.valueOf(-1), new HashMap<>());
/* 248 */       ((Map<String, Integer>)equipStats.get(Integer.valueOf(-1))).put("fixLevel", Integer.valueOf(MapleDataTool.getIntConvert("fixLevel", dat)));
     }

/* 251 */     dat = iz.getChildByPath("info/level/info");
/* 252 */     if (dat != null) {
/* 253 */       for (MapleData info : dat) {
/* 254 */         if (MapleDataTool.getIntConvert("exp", info, 0) == 0) {
           continue;
         }
/* 257 */         int lv = Integer.parseInt(info.getName());
/* 258 */         if (equipStats.get(Integer.valueOf(lv)) == null) {
/* 259 */           equipStats.put(Integer.valueOf(lv), new HashMap<>());
         }
/* 261 */         for (MapleData data : info) {
/* 262 */           if (data.getName().length() > 3) {
/* 263 */             ((Map<String, Integer>)equipStats.get(Integer.valueOf(lv))).put(data.getName().substring(3), Integer.valueOf(MapleDataTool.getIntConvert(data, 0)));
           }
         }
       }
     }
/* 268 */     dat = iz.getChildByPath("info");
/* 269 */     if (dat != null) {
/* 270 */       ps.setString(22, MapleDataTool.getString("afterImage", dat, ""));
/* 271 */       Map<String, Integer> rett = equipStats.get(Integer.valueOf(-1));
/* 272 */       for (MapleData data : dat.getChildren()) {
/* 273 */         if (data.getName().startsWith("inc")) {
/* 274 */           int gg = (int)MapleDataTool.getLongConvert(data, 0L);
/* 275 */           if (gg != 0) {
/* 276 */             rett.put(data.getName().substring(3), Integer.valueOf(gg));
           }
         }
       }

/* 281 */       for (String stat : GameConstants.stats) {
/* 282 */         MapleData mapleData = dat.getChildByPath(stat);
/* 283 */         if (stat.equals("canLevel")) {
/* 284 */           if (dat.getChildByPath("level") != null) {
/* 285 */             rett.put(stat, Integer.valueOf(1));
           }
/* 287 */         } else if (mapleData != null) {

/* 289 */           if (stat.equals("skill")) {
/* 290 */             for (int i = 0; i < mapleData.getChildren().size(); i++) {
/* 291 */               rett.put("skillid" + i, Integer.valueOf(MapleDataTool.getIntConvert(Integer.toString(i), mapleData, 0)));
             }
           } else {
/* 294 */             int dd = MapleDataTool.getIntConvert(mapleData, 0);
/* 295 */             if (dd != 0) {
/* 296 */               rett.put(stat, Integer.valueOf(dd));
             }
           }
         }
       }
     } else {
/* 302 */       ps.setString(22, "");
     }
/* 304 */     pse.setInt(1, this.id);
/* 305 */     for (Map.Entry<Integer, Map<String, Integer>> stats : equipStats.entrySet()) {
/* 306 */       pse.setInt(2, ((Integer)stats.getKey()).intValue());
/* 307 */       for (Map.Entry<String, Integer> stat : (Iterable<Map.Entry<String, Integer>>)((Map)stats.getValue()).entrySet()) {
/* 308 */         pse.setString(3, stat.getKey());
/* 309 */         pse.setInt(4, ((Integer)stat.getValue()).intValue());
/* 310 */         pse.addBatch();
       }
     }
/* 313 */     dat = iz.getChildByPath("info/addition");
/* 314 */     if (dat != null) {
/* 315 */       psa.setInt(1, this.id);
/* 316 */       for (MapleData mapleData : dat.getChildren()) {
/* 317 */         Pair<String, Integer> incs = null;
/* 318 */         switch (mapleData.getName()) {
           case "statinc":
           case "critical":
           case "skill":
           case "mobdie":
           case "hpmpchange":
           case "elemboost":
           case "elemBoost":
           case "mobcategory":
           case "boss":
/* 328 */             for (MapleData subKey : mapleData.getChildren()) {
/* 329 */               if (subKey.getName().equals("con")) {
/* 330 */                 for (MapleData conK : subKey.getChildren()) {
/* 331 */                   StringBuilder sbbb; switch (conK.getName()) {
                     case "job":
/* 333 */                       sbbb = new StringBuilder();
/* 334 */                       if (conK.getData() == null) {
/* 335 */                         for (MapleData ids : conK.getChildren()) {
/* 336 */                           sbbb.append(ids.getData().toString());
/* 337 */                           sbbb.append(",");
                         }
/* 339 */                         sbbb.deleteCharAt(sbbb.length() - 1);
                       } else {
/* 341 */                         sbbb.append(conK.getData().toString());
                       }
/* 343 */                       psa.setString(2, mapleData.getName().equals("elemBoost") ? "elemboost" : mapleData.getName());
/* 344 */                       psa.setString(3, "con:job");
/* 345 */                       psa.setString(4, sbbb.toString());
/* 346 */                       psa.addBatch();
                       continue;

                     case "weekDay":
                       continue;
                   }
/* 352 */                   psa.setString(2, mapleData.getName().equals("elemBoost") ? "elemboost" : mapleData.getName());
/* 353 */                   psa.setString(3, "con:" + conK.getName());
/* 354 */                   psa.setString(4, conK.getData().toString());
/* 355 */                   psa.addBatch();
                 }

                 continue;
               }
/* 360 */               psa.setString(2, mapleData.getName().equals("elemBoost") ? "elemboost" : mapleData.getName());
/* 361 */               psa.setString(3, subKey.getName());
/* 362 */               psa.setString(4, subKey.getData().toString());
/* 363 */               psa.addBatch();
             }
             continue;
         }

/* 368 */         System.out.println("UNKNOWN EQ ADDITION : " + mapleData.getName() + " from " + this.id);
       }
     }


/* 373 */     dat = iz.getChildByPath("reward");
/* 374 */     if (dat != null) {
/* 375 */       psr.setInt(1, this.id);
/* 376 */       for (MapleData reward : dat) {
/* 377 */         psr.setInt(2, MapleDataTool.getIntConvert("item", reward, 0));
/* 378 */         psr.setInt(3, MapleDataTool.getIntConvert("prob", reward, 0));
/* 379 */         psr.setInt(4, MapleDataTool.getIntConvert("count", reward, 0));
/* 380 */         psr.setInt(5, MapleDataTool.getIntConvert("period", reward, 0));
/* 381 */         psr.setString(6, MapleDataTool.getString("worldMsg", reward, ""));
/* 382 */         psr.setString(7, MapleDataTool.getString("Effect", reward, ""));
/* 383 */         psr.addBatch();
/* 384 */         totalprob += MapleDataTool.getIntConvert("prob", reward, 0);
       }
     }
/* 387 */     ps.setInt(17, totalprob);
/* 388 */     ps.setString(18, incSkill.toString());
/* 389 */     dat = iz.getChildByPath("replace");
/* 390 */     if (dat != null) {
/* 391 */       ps.setInt(19, MapleDataTool.getInt("itemid", dat, 0));
/* 392 */       ps.setString(20, MapleDataTool.getString("msg", dat, ""));
     } else {
/* 394 */       ps.setInt(19, 0);
/* 395 */       ps.setString(20, "");
     }
/* 397 */     ps.setInt(21, MapleDataTool.getInt("info/create", iz, 0));
/* 398 */     ps.addBatch();
   }


   public void dumpItems(PreparedStatement psa, PreparedStatement psr, PreparedStatement ps, PreparedStatement pse) throws Exception {
/* 403 */     delete("DELETE FROM wz_itemdata");
/* 404 */     delete("DELETE FROM wz_itemequipdata");
/* 405 */     delete("DELETE FROM wz_itemadddata");
/* 406 */     delete("DELETE FROM wz_itemrewarddata");
/* 407 */     System.out.println("清空\"wz_itemdata\"库成功");
/* 408 */     System.out.println("正在添加进\"wz_itemdata\"库.....");
/* 409 */     dumpItems(this.item, psa, psr, ps, pse, false);
/* 410 */     dumpItems(this.character, psa, psr, ps, pse, true);
/* 411 */     System.out.println("完成\"wz_itemdata\"库的转存, 转存还在进行请勿关闭...");
   }

   public int currentId() {
/* 415 */     return this.id;
   }
   protected final MapleData getStringData(int itemId) {
     MapleData data;
/* 419 */     String cat = null;


/* 422 */     if (itemId >= 5010000) {
/* 423 */       data = this.cashStringData;
/* 424 */     } else if (itemId >= 2000000 && itemId < 3000000) {
/* 425 */       data = this.consumeStringData;
/* 426 */     } else if ((itemId >= 1010000 && itemId < 1040000) || (itemId >= 1122000 && itemId < 1123000) || (itemId >= 1132000 && itemId < 1210000)) {
/* 427 */       data = this.eqpStringData;
/* 428 */       cat = "Eqp/Accessory";
/* 429 */     } else if (itemId >= 1662000 && itemId < 1680000) {
/* 430 */       data = this.eqpStringData;
/* 431 */       cat = "Eqp/Android";
/* 432 */     } else if (itemId >= 1680000 && itemId < 1690000) {
/* 433 */       data = this.eqpStringData;
/* 434 */       cat = "Eqp/Bits";
/* 435 */     } else if (itemId >= 1000000 && itemId < 1010000) {
/* 436 */       data = this.eqpStringData;
/* 437 */       cat = "Eqp/Cap";
/* 438 */     } else if (itemId >= 1100000 && itemId < 1103000) {
/* 439 */       data = this.eqpStringData;
/* 440 */       cat = "Eqp/Cape";
/* 441 */     } else if (itemId >= 1040000 && itemId < 1050000) {
/* 442 */       data = this.eqpStringData;
/* 443 */       cat = "Eqp/Coat";
/* 444 */     } else if (itemId >= 1920000 && itemId < 2000000) {
/* 445 */       data = this.eqpStringData;
/* 446 */       cat = "Eqp/Dragon";
/* 447 */     } else if (itemId >= 20000 && itemId < 25000) {
/* 448 */       data = this.eqpStringData;
/* 449 */       cat = "Eqp/Face";
/* 450 */     } else if (itemId >= 1080000 && itemId < 1090000) {
/* 451 */       data = this.eqpStringData;
/* 452 */       cat = "Eqp/Glove";
/* 453 */     } else if (itemId >= 30000 && itemId < 40000) {
/* 454 */       data = this.eqpStringData;
/* 455 */       cat = "Eqp/Hair";
/* 456 */     } else if (itemId >= 1050000 && itemId < 1060000) {
/* 457 */       data = this.eqpStringData;
/* 458 */       cat = "Eqp/Longcoat";
/* 459 */     } else if (itemId >= 1610000 && itemId < 1660000) {
/* 460 */       data = this.eqpStringData;
/* 461 */       cat = "Eqp/Mechanic";
/* 462 */     } else if (itemId >= 1842000 && itemId < 1893000) {
/* 463 */       data = this.eqpStringData;
/* 464 */       cat = "Eqp/MonsterBattle";
/* 465 */     } else if (itemId >= 1060000 && itemId < 1070000) {
/* 466 */       data = this.eqpStringData;
/* 467 */       cat = "Eqp/Pants";
/* 468 */     } else if (itemId >= 1802000 && itemId < 1820000) {
/* 469 */       data = this.eqpStringData;
/* 470 */       cat = "Eqp/PetEquip";
/* 471 */     } else if (itemId >= 1112000 && itemId < 1130000) {
/* 472 */       data = this.eqpStringData;
/* 473 */       cat = "Eqp/Ring";
/* 474 */     } else if (itemId >= 1092000 && itemId < 1100000) {
/* 475 */       data = this.eqpStringData;
/* 476 */       cat = "Eqp/Shield";
/* 477 */     } else if (itemId >= 1070000 && itemId < 1080000) {
/* 478 */       data = this.eqpStringData;
/* 479 */       cat = "Eqp/Shoes";
/* 480 */     } else if (itemId >= 1603000 && itemId < 1604000) {
/* 481 */       data = this.eqpStringData;
/* 482 */       cat = "Eqp/Skillskin";
/* 483 */     } else if (itemId >= 1900000 && itemId < 2000000) {
/* 484 */       data = this.eqpStringData;
/* 485 */       cat = "Eqp/Taming";
/* 486 */     } else if (itemId >= 1210000 && itemId < 1800000) {
/* 487 */       data = this.eqpStringData;
/* 488 */       cat = "Eqp/Weapon";
/* 489 */     } else if (itemId >= 1172000 && itemId < 1180000) {
/* 490 */       data = this.eqpStringData;
/* 491 */       cat = "Eqp/MonsterBook";
/* 492 */     } else if (itemId >= 4000000 && itemId < 5000000) {
/* 493 */       data = this.etcStringData;
/* 494 */       cat = "Etc";
/* 495 */     } else if (itemId >= 3000000 && itemId < 4000000) {
/* 496 */       data = this.insStringData;
/* 497 */     } else if (itemId >= 5000000 && itemId < 5010000) {
/* 498 */       data = this.petStringData;
     } else {
/* 500 */       return null;
     }
/* 502 */     if (cat == null) {
/* 503 */       return data.getChildByPath(String.valueOf(itemId));
     }
/* 505 */     return data.getChildByPath(cat + "/" + itemId);
   }
 }


/* Location:              C:\PGX\Server.jar!\tools\wztosql\DumpItems.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */